home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 May: Tool Chest / Dev.CD May 97 TC.toast / Sample Code / Networking / Http Server / •OT_Classes / TNetworkEndpointDescriptor.h < prev    next >
Encoding:
Text File  |  1996-01-11  |  1.7 KB  |  69 lines  |  [TEXT/CWIE]

  1. //    TNetworkEndpointDescriptor.h - Macintosh OpenTransport network Endpoint Descriptor class object
  2. // 
  3. // Apple Macintosh Developer Technical Support
  4. // Written by:  Vinne Moscaritolo
  5. //
  6. //  Copyright (work in progress)  Apple Computer, Inc All rights reserved.
  7. //
  8. // You may incorporate this sample code into your applications without
  9. // restriction, though the sample code has been provided "AS IS" and the
  10. // responsibility for its operation is 100% yours.  However, what you are
  11. // not permitted to do is to redistribute the source as "DSC Sample Code"
  12. // after having made changes. If you're going to re-distribute the source,
  13. // we require that you make it clear in the source that the code was
  14. // descended from Apple Sample Code, but that you've made changes.
  15. // 
  16.  
  17. #ifndef _H_TNetworkEndpointDescriptor
  18. #define _H_TNetworkEndpointDescriptor
  19.  
  20. #include <OpenTransport.h>
  21. #include "Taddr.h"
  22.  
  23.  
  24. //
  25. // TNetworkEndpointDescriptor  - OpenTransport network Endpoint Descriptor class 
  26. //
  27. class TNetworkEndpointDescriptor 
  28. {
  29.  
  30. public:
  31.  
  32. //     CONSTRUCTORS AND DESTRUCTORS
  33.             TNetworkEndpointDescriptor():
  34.                                 fState(S_UNINIT),
  35.                                 fConfig(kOTInvalidConfigurationPtr),
  36.                                 fAddress(NULL) {};
  37.                                                                 
  38.             ~TNetworkEndpointDescriptor();
  39.  
  40. // HIGH LEVEL FUNCTIONS
  41. public:
  42.     void*         Stream();
  43.     void        Unstream(void* in);
  44.     
  45.     OTResult    Validate();
  46.     
  47.     Boolean     Filter(TCall*);
  48.     Boolean        ValidateBind(TBind*,TBind*);
  49.         
  50.  
  51. // ACCESSORS
  52.     OTConfiguration*    GetConfiguration() const;
  53.     TAddr*                GetLocalAddress();
  54.     char*                GetServiceName()  { return fServiceName; };
  55.     
  56.  
  57. // PRIVATE FIELDS
  58. private:
  59.  enum EState { S_UNINIT, S_INIT } ;
  60.     EState                fState;
  61.     OTConfiguration*    fConfig;    
  62.     TAddr*                fAddress;        
  63.     char                fServiceName[255];
  64.  
  65. };
  66.  
  67.  
  68. #endif
  69.